global cardid -- contains the id of the current card
global buttonid -- contains the id of the current new button
global stackname
Answer "Do you wish to make:" with "New Stack" or "Add Card" or "Add StCard"
if it = "New Stack" then
makeStack -- create the new stack and get a pointer to it, come back
ButtonToStack -- make a pointer to the new stack
pasteButton -- make a replication of the combo button
end if
if it = "Add Card" then
makeCard -- create new card in current stack
ButtonToCard -- make a pointer to the new card
pasteButton -- make a replication of the combo button
end if
if it = "Add StCard" then
makeStackCard -- create new card in last created stack, come back
ButtonToStackCard -- make a pointer to the new stack card
pasteButton -- make a replication of the combo button
end if
end mouseUp
on makeStackCard
global cardid -- contains the id of the current card
global buttonid -- contains the id of the current new button
global stackname
push card
go to last card of stackname
doMenu New Card -- get a new stack for a data definition
get the id of this card -- make sure you know from where you came
put it into cardid
get the name of this stack
put it into stackname
pop card
end makeStackCard
on ButtonToStackCard
global cardid -- contains the id of the current card
global buttonid -- contains the id of the current new button
global stackname
doMenu New Button
get the id of button "New Button"
put it into buttonid
set script of button "New Button" to "on mouseUp" & return & "go to " & cardid & " of " & stackname & return &"end mouseUp"
ask "Enter the name of the button" with "New Button"
set name of button "New Button" to it
end ButtonToStackCard
on makeStack
global cardid -- contains the id of the current card
global buttonid -- contains the id of the current new button
global stackname
push card
doMenu New Stack... -- get a new stack for a data definition
get the id of this card -- make sure you know from where you came
put it into cardid
get the name of this stack
put it into stackname
pop card
end makeStack
on ButtonToStack -- make a pointer to the stack
global cardid -- contains the id of the current card
global buttonid -- contains the id of the current new button
global stackname
doMenu New Button
get the id of button "New Button"
put it into buttonid
set script of button "New Button" to "on mouseUp" & return & "go to " & cardid & " of " & stackname & return &"end mouseUp"
ask "Enter the name of the button" with "New Button"
set name of button "New Button" to it
end ButtonToStack
on makeCard
global cardid -- contains the id of the current card
global buttonid -- contains the id of the current new button
global stackname
push card
doMenu New Card -- get a new stack for a data definition
get the id of this card -- make sure you know from where you came
put it into cardid
get the name of this stack
put it into stackname
pop card
end makeCard
on ButtonToCard -- make a pointer to the stack
global cardid -- contains the id of the current card
global buttonid -- contains the id of the current new button
global stackname
doMenu New Button
get the id of button "New Button"
put it into buttonid
set script of button "New Button" to "on mouseUp" & return & "go to " & cardid & " of " & stackname & return &"end mouseUp"
ask "Enter the name of the button" with "New Button"
set name of button "New Button" to it
end ButtonToCard
on pasteButton
global cardid -- contains the id of the current card
global buttonid -- contains the id of the current new button
global stackname
if (stackname <> empty) and (cardid <> empty) then
push card
choose button tool
Click at the loc of button "Combination"
doMenu Copy Button
go to card 1 of stackname
go to cardid
doMenu Paste Button
pop card
choose browse tool
end if
end pasteButton
-- part 6 (button)
-- low flags: 00
-- high flags: 0000
-- rect: left=60 top=282 right=321 bottom=102
-- title width / last selected line: 0
-- icon id / first selected line: 2507 / 2507
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Help
----- HyperTalk script -----
on mouseUp
show card field "Other Info"
end mouseUp
-- part 7 (field)
-- low flags: 81
-- high flags: 2007
-- rect: left=28 top=66 right=282 bottom=478
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 0
-- font id: 3
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Other Info
----- HyperTalk script -----
on mouseUp
hide card field "Other Info"
end mouseUp
-- part 9 (button)
-- low flags: 00
-- high flags: 8003
-- rect: left=384 top=35 right=57 bottom=484
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Combination
----- HyperTalk script -----
on mouseUp
global cardid -- contains the id of the current card
global buttonid -- contains the id of the current new button
global stackname
Answer "Do you wish to make:" with "New Stack" or "Add Card" or "Add StCard"
if it = "New Stack" then
makeStack -- create the new stack and get a pointer to it, come back
ButtonToStack -- make a pointer to the new stack
pasteButton -- make a replication of the combo button
end if
if it = "Add Card" then
makeCard -- create new card in current stack
ButtonToCard -- make a pointer to the new card
pasteButton -- make a replication of the combo button
end if
if it = "Add StCard" then
makeStackCard -- create new card in last created stack, come back
ButtonToStackCard -- make a pointer to the new stack card
pasteButton -- make a replication of the combo button
end if
end mouseUp
on makeStackCard
global cardid -- contains the id of the current card
global buttonid -- contains the id of the current new button
global stackname
push card
go to last card of stackname
doMenu New Card -- get a new stack for a data definition
get the id of this card -- make sure you know from where you came
put it into cardid
get the name of this stack
put it into stackname
pop card
end makeStackCard
on ButtonToStackCard
global cardid -- contains the id of the current card
global buttonid -- contains the id of the current new button
global stackname
doMenu New Button
get the id of button "New Button"
put it into buttonid
set script of button "New Button" to "on mouseUp" & return & "go to " & cardid & " of " & stackname & return &"end mouseUp"
ask "Enter the name of the button" with "New Button"
set name of button "New Button" to it
end ButtonToStackCard
on makeStack
global cardid -- contains the id of the current card
global buttonid -- contains the id of the current new button
global stackname
push card
doMenu New Stack... -- get a new stack for a data definition
get the id of this card -- make sure you know from where you came
put it into cardid
get the name of this stack
put it into stackname
pop card
end makeStack
on ButtonToStack -- make a pointer to the stack
global cardid -- contains the id of the current card
global buttonid -- contains the id of the current new button
global stackname
doMenu New Button
get the id of button "New Button"
put it into buttonid
set script of button "New Button" to "on mouseUp" & return & "go to " & cardid & " of " & stackname & return &"end mouseUp"
ask "Enter the name of the button" with "New Button"
set name of button "New Button" to it
end ButtonToStack
on makeCard
global cardid -- contains the id of the current card
global buttonid -- contains the id of the current new button
global stackname
push card
doMenu New Card -- get a new stack for a data definition
get the id of this card -- make sure you know from where you came
put it into cardid
get the name of this stack
put it into stackname
pop card
end makeCard
on ButtonToCard -- make a pointer to the stack
global cardid -- contains the id of the current card
global buttonid -- contains the id of the current new button
global stackname
doMenu New Button
get the id of button "New Button"
put it into buttonid
set script of button "New Button" to "on mouseUp" & return & "go to " & cardid & " of " & stackname & return &"end mouseUp"
ask "Enter the name of the button" with "New Button"
set name of button "New Button" to it
end ButtonToCard
on pasteButton
global cardid -- contains the id of the current card
global buttonid -- contains the id of the current new button
global stackname
if (stackname <> empty) and (cardid <> empty) then
push card
choose button tool
Click at the loc of button "Combination"
doMenu Copy Button
go to card 1 of stackname
go to cardid
doMenu Paste Button
pop card
choose browse tool
end if
end pasteButton
-- part contents for card part 7
----- text -----
In order to use the self-replicating button, you need only take the combination button and copy it to the card that you will use. At that point do the following:
1. press the Combination button.
2. you will then be presented with a dialog box with three buttons:
New Stack - pressing this button creates the first card in a new stack, with the background as selected on the new stack dialog, makes a button that points to it on the current card, moves the combination button to the new card, and then returns to the current card.
Add Card - pressing this button creates a new card in the current stack, behind the current card, with the current card's background, makes a button that points to it on the current card, moves the combination button to the new card, and then returns to the current card.
Add StCard - pressing this button creates a new card in the last new stack that was created, with the current card's background, makes a button that points to it on the current card, moves the combination button to the new card, and then returns to the current card.
3. Go to the tool menu, select the button tool, click on the new button and move it to the required location on the current card.